﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace SCS.Web.UI.WebControls
{
    /// <summary>
    /// Event delegate for <see cref="HierList.ViewStateLoading"/> and <see cref="HierList.ViewStateSaving"/>.
    /// </summary>
    /// <param name="sender">The sending object.</param>
    /// <param name="e">The event arguments.</param>
    public delegate void ViewStateEventHandler(object sender, ViewStateEventArgs e);

    /// <summary>
    /// Represents event arguments for <see cref="HierList.ViewStateLoading"/> and <see cref="HierList.ViewStateSaving"/>.
    /// </summary>
    public class ViewStateEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ViewStateEventArgs"/> class.
        /// </summary>
        /// <param name="stateInfo">The state info.</param>
        public ViewStateEventArgs(object stateInfo)
        {
            StateInfo = stateInfo;
        }

        /// <summary>
        /// Gets or sets the state info.
        /// </summary>
        /// <value>The state info.</value>
        public object StateInfo
        {
            get;
            set;
        }
    }
}
